﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            Plane P1 = new Plane("飞机");
            Test2(P1);
            Test3(P1);
            Console.WriteLine();
            Bird B1 = new Bird("小鸟");
            Test1(B1);
            Test3(B1);
            B1.Layeggs();
            Console.WriteLine();
            SuperMan S1 = new SuperMan("超人");
            Test1(S1);
            Test3(S1);
        }
        static void Test1(Animal a)
        {
            a.Eat();
        }
        static void Test2(Vehicle v)
        {
            v.Run();
        }
        static void Test3(IFly f)
        {
            f.TakeOff();
            f.Fly();
            f.Land();
        }
    }
}
